package adapter;

import android.support.annotation.Nullable;
import android.view.View;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

import bean.IndexBean;
import student.andlei.com.student.R;


public class AllNoticeAdapter extends BaseQuickAdapter<IndexBean.Notice,BaseViewHolder> {
    public AllNoticeAdapter(int layoutResId, @Nullable List data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, IndexBean.Notice item) {
        helper.setText(R.id.tv_notice,"  "+item.title+"   ");
        helper.setText(R.id.tv_creattime,item.create_time);
       if(item.is_new.equals("1")){
           helper.getView(R.id.img_redpoint).setVisibility(View.VISIBLE);
       } else {
           helper.getView(R.id.img_redpoint).setVisibility(View.GONE);
       }
    }


}
